import pandas as pds
import numpy as np
students = ["stu" + str(i) for i in range(1, 61)]
grade = np.random.randint(30, 100, (60, 6))
classes = ["china", "math", 'Eniglis', "computer", "sport", "history"]
form = pds.DataFrame(grade, index=students, columns=classes)
print(form.iloc[:, :])
avg_math = np.mean(form, axis=0)
print("数学平均分是: ", avg_math[1])
avg_china= np.mean(form, axis=0)
print("语文的平均是: ", avg_china[0])
form.to_excel(r"C:\www\student_grade.xlsx")
